﻿#include "subwdiget.h"

subwdiget::subwdiget(QWidget *parent) : QWidget(parent)
{
    this->setWindowTitle("子窗口");
    this->resize(600,400);

    button = new QPushButton;
    button->setParent(this);
    button->resize(60,40);
    button->move(100,100);
    button->setText("隐藏");

    // 按钮按下信号和窗口的槽函数绑定
    connect(button,&QPushButton::pressed,this,&subwdiget::emitMySignal);
}

void subwdiget::emitMySignal()
{
    emit showHideSignal(10);
}
